<?php
@session_start();
include ("template/head.php");
if($user['account_login']=="user"){
		header('location:list_article.php?action=access_denied');
	}
?>

<div class="container-fluid">
	<div class="row-fluid">
		<?php include("template/menu_left.php")
		?>

		<div class="span10" id="content">
			<div class="row-fluid">
				<?php
				if ((isset($_GET["action"])) && ($_GET["action"] == "user_exist")) {
					echo '
                <br>
                <div class="alert alert-danger">
                    Utilisateurs existe déja <button type="button" class="close" data-dismiss="alert">&times;</button>
                </div>';
				}
				if ((isset($_GET["action"])) && ($_GET["action"] == "user_added")) {
					echo '
                <br>
                <div class="alert alert-success">
                    Utilisateurs ajouté avec succès <button type="button" class="close" data-dismiss="alert">&times;</button>
                </div>';
				}
				?>
				
				

				<!-- block -->
				<div class="block">
					<div class="navbar navbar-inner block-header">
						<div class="muted pull-left">
							<h5>Gestion utilisateurs </h5>
						</div>
					</div>
					<div class="block-content collapse in">
						<div class="span12">
							<table cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-condensed table-hover table-striped"  id="example">
								<thead>
									<tr>
										<th style="width: 300px;" >Adresse email</th>
										<th style="width: 300px;">Mot de passe </th>
										<th style="width: 400px;" >Type d'utilisateurs</th>
									</tr>
								</thead>
								<tbody>
									<?php
										while($log = mysql_fetch_object($log_query)) {
									?>
									<tr class="odd gradeX">
										<td class="sorting_desc"><?php echo $log->email_login ?></td>
								        <td><?php echo $log->date?></td>
								        <td><?php echo $log->time?></td>
									</tr>
									<?php }; ?>
								</tbody>
							</table>
						</div>
					</div>
					<a class="btn btn-danger btn-sm" href="submit/delete_log.php" style="float:right;width:200px;margin:20px;" >Effacé l'historique</a>
				</div>
				<!-- /block -->
				
			</div>
		</div>
	</div>
	<hr>
</div>
<?php
include ("template/footer.php");
?>